package com.example.testbook.service;

import com.example.testbook.mapper.BookMapper1;
import com.example.testbook.model.BookInfo;
import com.example.testbook.model.BookInfo1;
import com.example.testbook.model.UserInfo1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@RequestMapping
public class BookService1 {
    @Autowired
    BookMapper1 bookMapper1;
    //遍历图书
//    public List<UserInfo1> getBookListByPage(){
//        return bookMapper1
//    }

    //删除图书
    public Boolean deleteBook(int bookId) {
        BookInfo1 bookInfo = new BookInfo1();
        bookInfo.setId(bookId);
        bookInfo.setStatus(0);
return bookMapper1.deleteBook(bookInfo);
    }
}
